<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateChargesTable extends Migration
{
    /**支付渠道表
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('charges', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('pid')->default(0)->comment('父id');
            $table->string('name', 50)->comment('渠道名称');
            $table->tinyInteger('status')->default(1)->comment('状态');
            $table->integer('channel_no')->comment('渠道号');
            $table->string('app_key', 50)->nullable()->comment('支付key');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('charges');
    }
}
